//
//  webWindow.m
//  SunXi
//
//  Created by dllo on 15/12/8.
//  Copyright © 2015年 大远. All rights reserved.
//

#import "webWindow.h"

@implementation webWindow
+ (webWindow *)sharedInstance
{
    static id sharedInstance = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        sharedInstance = [[self alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    });
    return sharedInstance;
}
- (void)show:(NSDictionary *)dic{
    [self makeKeyWindow];
    self.hidden = NO;
    WebView *web = [[WebView alloc]init];
    web.html = NO;
    //"shareinfo"
    web.tittle  =dic[@"title"];
    web.url = dic[@"web"];
    UINavigationController *naVC = [[UINavigationController alloc]initWithRootViewController:web];
    self.rootViewController = naVC;
}

- (void)hidd{
    [self resignKeyWindow];
    self.hidden = YES;
    self.rootViewController = nil;
}

    /*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
